package com.cndw.kungfu.core;

import com.cndw.kungfu.ext.TimeProcesser;

/**
 * 模块运行内存对象父类
 * @author fantadust [9677889@qq.com]
 * @date 2011-11-3 下午1:04:13
 */
public abstract class MemoryDataObject {
	
	/**
	 * 对象创建时间
	 */
	private int memoryCreateTime;
	/**
	 * 对象上次读取时间
	 */
	private int memoryLastRead;	

	public int getMemoryCreateTime() {
		return memoryCreateTime;
	}
	public void setMemoryCreateTime(int memoryCreateTime) {
		this.memoryCreateTime = memoryCreateTime;
	}
	public int getMemoryLastRead() {
		return memoryLastRead;
	}
	public void setMemoryLastRead(int memoryLastRead) {
		this.memoryLastRead = memoryLastRead;
	}
	public void refreshMemoryLastRead(){
		memoryLastRead = TimeProcesser.getUnixTime();
	}
	
	/**
	 * 对象当前是否可回收
	 * @return
	 */
	public abstract boolean isCanGc();
	
	
	
}
